<div class="parent">
    <div class="test"></div>
  </div>
<style>
    .parent {
            border: 2px solid #333;
            width: 100px;
            height: 100px;
            display: flex;
            justify-content: left;
            align-items: center;
          }
    .test {
          width: 40px;
          height: 40px;
          background-color: pink;
            
     }
    </style>
    
</style>